<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>用户中心 - 朋知云学</title>
    <link rel="stylesheet" href="css/style.css">
    <link rel="stylesheet" href="css/index.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css">
    <style>
        /* 用户中心页面特定样式 */
        .user-center-header {
            background: linear-gradient(135deg, #5bc0eb, #3a9fcb);
            color: white;
            padding: 40px 0;
            margin-bottom: 30px;
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
        }
        
        .user-profile {
            display: flex;
            align-items: center;
            gap: 20px;
        }
        
        .user-avatar {
            width: 100px;
            height: 100px;
            border-radius: 50%;
            object-fit: cover;
            border: 4px solid rgba(255, 255, 255, 0.3);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        }
        
        .user-info h1 {
            font-size: 28px;
            margin-bottom: 5px;
        }
        
        .user-info p {
            opacity: 0.9;
            margin-bottom: 10px;
        }
        
        .user-stats {
            display: flex;
            gap: 20px;
            margin-top: 10px;
        }
        
        .stat-item {
            display: flex;
            align-items: center;
            gap: 5px;
        }
        
        .stat-item i {
            font-size: 18px;
        }
        
        .user-center-tabs {
            display: flex;
            border-bottom: 1px solid #eee;
            margin-bottom: 30px;
        }
        
        .tab-item {
            padding: 15px 25px;
            cursor: pointer;
            font-weight: 500;
            color: #666;
            border-bottom: 3px solid transparent;
            transition: all 0.3s ease;
        }
        
        .tab-item:hover {
            color: #5bc0eb;
        }
        
        .tab-item.active {
            color: #5bc0eb;
            border-bottom-color: #5bc0eb;
        }
        
        .tab-content {
            display: none;
        }
        
        .tab-content.active {
            display: block;
            animation: fadeIn 0.5s ease-in-out;
        }
        
        .application-card, .collection-card {
            background-color: white;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
            padding: 20px;
            margin-bottom: 20px;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }
        
        .application-card:hover, .collection-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        }
        
        .application-header, .collection-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
        }
        
        .application-title, .collection-title {
            font-size: 18px;
            font-weight: 600;
            color: #333;
        }
        
        .application-status {
            padding: 5px 10px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 500;
        }
        
        .status-pending {
            background-color: #ffeeba;
            color: #856404;
        }
        
        .status-approved {
            background-color: #d4edda;
            color: #155724;
        }
        
        .status-rejected {
            background-color: #f8d7da;
            color: #721c24;
        }
        
        .application-details, .collection-details {
            margin-bottom: 15px;
        }
        
        .detail-item {
            display: flex;
            margin-bottom: 8px;
            color: #666;
        }
        
        .detail-label {
            width: 80px;
            font-weight: 500;
            color: #333;
        }
        
        .application-actions, .collection-actions {
            display: flex;
            gap: 10px;
        }
        
        .empty-state {
            text-align: center;
            padding: 50px 0;
            color: #666;
        }
        
        .empty-state i {
            font-size: 48px;
            color: #ddd;
            margin-bottom: 15px;
            display: block;
        }
        
        .user-settings {
            background-color: white;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
            padding: 30px;
        }
        
        .settings-group {
            margin-bottom: 25px;
        }
        
        .settings-title {
            font-size: 18px;
            font-weight: 600;
            margin-bottom: 15px;
            color: #333;
            border-bottom: 1px solid #eee;
            padding-bottom: 10px;
        }
        
        .form-group {
            margin-bottom: 20px;
        }
        
        .form-label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
            color: #333;
        }
        
        .form-control {
            width: 100%;
            padding: 10px 15px;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 16px;
            transition: border-color 0.3s ease;
        }
        
        .form-control:focus {
            border-color: #5bc0eb;
            outline: none;
        }
        
        .settings-actions {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
            margin-top: 20px;
        }
        
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }
    </style>
</head>
<body>
    <!-- 导航栏 -->
    <header class="navbar">
        <div class="container">
            <div class="logo">
                <img src="../static/avatar1.png" alt="朋知云学">
                <span>朋知云学</span>
            </div>
            <nav class="nav-menu">
                <ul>
                    <li><a href="index.html">首页</a></li>
                    <li><a href="demands.html">支教需求</a></li>
                    <li><a href="ai-assistant.html">AI助手</a></li>
                    <li><a href="user-center.html" class="active">用户中心</a></li>
                </ul>
            </nav>
            <div class="user-actions">
                <a href="login.html" class="btn btn-login">登录</a>
                <a href="register.html" class="btn btn-register">注册</a>
            </div>
        </div>
    </header>

    <!-- 用户中心头部 -->
    <section class="user-center-header">
        <div class="container">
            <div class="user-profile">
                <img src="../static/avatar1.png" alt="用户头像" class="user-avatar">
                <div class="user-info">
                    <h1>张三</h1>
                    <p><i class="bi bi-geo-alt"></i> 北京市</p>
                    <p>大学生志愿者 | 已参与3次支教活动</p>
                    <div class="user-stats">
                        <div class="stat-item">
                            <i class="bi bi-calendar-check"></i>
                            <span>申请记录: 5</span>
                        </div>
                        <div class="stat-item">
                            <i class="bi bi-bookmark-heart"></i>
                            <span>收藏: 8</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- 用户中心主体内容 -->
    <div class="container">
        <!-- 选项卡导航 -->
        <div class="user-center-tabs">
            <div class="tab-item active" data-tab="applications">申请记录</div>
            <div class="tab-item" data-tab="collections">我的收藏</div>
            <div class="tab-item" data-tab="settings">账号设置</div>
        </div>

        <!-- 申请记录选项卡 -->
        <div class="tab-content active" id="applications">
            <div class="application-card">
                <div class="application-header">
                    <div class="application-title">山区小学语文教师支教</div>
                    <div class="application-status status-approved">已通过</div>
                </div>
                <div class="application-details">
                    <div class="detail-item">
                        <div class="detail-label">申请时间:</div>
                        <div>2023-09-15</div>
                    </div>
                    <div class="detail-item">
                        <div class="detail-label">支教地点:</div>
                        <div>云南省丽江市</div>
                    </div>
                    <div class="detail-item">
                        <div class="detail-label">支教时间:</div>
                        <div>2023-10-01 至 2023-12-31</div>
                    </div>
                    <div class="detail-item">
                        <div class="detail-label">支教科目:</div>
                        <div>语文、数学</div>
                    </div>
                </div>
                <div class="application-actions">
                    <a href="demand-detail.html?id=1" class="btn btn-outline">查看详情</a>
                    <a href="#" class="btn btn-primary">联系学校</a>
                </div>
            </div>

            <div class="application-card">
                <div class="application-header">
                    <div class="application-title">乡村初中英语教师招募</div>
                    <div class="application-status status-pending">审核中</div>
                </div>
                <div class="application-details">
                    <div class="detail-item">
                        <div class="detail-label">申请时间:</div>
                        <div>2023-09-20</div>
                    </div>
                    <div class="detail-item">
                        <div class="detail-label">支教地点:</div>
                        <div>贵州省黔东南州</div>
                    </div>
                    <div class="detail-item">
                        <div class="detail-label">支教时间:</div>
                        <div>2023-09-15 至 2024-01-15</div>
                    </div>
                    <div class="detail-item">
                        <div class="detail-label">支教科目:</div>
                        <div>英语</div>
                    </div>
                </div>
                <div class="application-actions">
                    <a href="demand-detail.html?id=2" class="btn btn-outline">查看详情</a>
                    <a href="#" class="btn btn-secondary">取消申请</a>
                </div>
            </div>

            <div class="application-card">
                <div class="application-header">
                    <div class="application-title">留守儿童课后辅导</div>
                    <div class="application-status status-rejected">未通过</div>
                </div>
                <div class="application-details">
                    <div class="detail-item">
                        <div class="detail-label">申请时间:</div>
                        <div>2023-09-10</div>
                    </div>
                    <div class="detail-item">
                        <div class="detail-label">支教地点:</div>
                        <div>四川省凉山州</div>
                    </div>
                    <div class="detail-item">
                        <div class="detail-label">支教时间:</div>
                        <div>2023-10-10 至 2023-12-20</div>
                    </div>
                    <div class="detail-item">
                        <div class="detail-label">支教科目:</div>
                        <div>综合课程</div>
                    </div>
                </div>
                <div class="application-actions">
                    <a href="demand-detail.html?id=3" class="btn btn-outline">查看详情</a>
                    <a href="#" class="btn btn-primary">重新申请</a>
                </div>
            </div>
        </div>

        <!-- 我的收藏选项卡 -->
        <div class="tab-content" id="collections">
            <div class="collection-card">
                <div class="collection-header">
                    <div class="collection-title">高中物理教师支教招募</div>
                    <div><i class="bi bi-bookmark-fill" style="color: #5bc0eb;"></i></div>
                </div>
                <div class="collection-details">
                    <div class="detail-item">
                        <div class="detail-label">收藏时间:</div>
                        <div>2023-09-18</div>
                    </div>
                    <div class="detail-item">
                        <div class="detail-label">支教地点:</div>
                        <div>甘肃省兰州市</div>
                    </div>
                    <div class="detail-item">
                        <div class="detail-label">支教时间:</div>
                        <div>2023-11-01 至 2024-02-28</div>
                    </div>
                    <div class="detail-item">
                        <div class="detail-label">支教科目:</div>
                        <div>物理</div>
                    </div>
                </div>
                <div class="collection-actions">
                    <a href="demand-detail.html?id=4" class="btn btn-outline">查看详情</a>
                    <a href="#" class="btn btn-primary">申请组队</a>
                    <a href="#" class="btn btn-secondary">取消收藏</a>
                </div>
            </div>

            <div class="collection-card">
                <div class="collection-header">
                    <div class="collection-title">乡村小学美术教师招募</div>
                    <div><i class="bi bi-bookmark-fill" style="color: #5bc0eb;"></i></div>
                </div>
                <div class="collection-details">
                    <div class="detail-item">
                        <div class="detail-label">收藏时间:</div>
                        <div>2023-09-16</div>
                    </div>
                    <div class="detail-item">
                        <div class="detail-label">支教地点:</div>
                        <div>湖南省张家界市</div>
                    </div>
                    <div class="detail-item">
                        <div class="detail-label">支教时间:</div>
                        <div>2023-10-15 至 2023-12-15</div>
                    </div>
                    <div class="detail-item">
                        <div class="detail-label">支教科目:</div>
                        <div>美术</div>
                    </div>
                </div>
                <div class="collection-actions">
                    <a href="demand-detail.html?id=5" class="btn btn-outline">查看详情</a>
                    <a href="#" class="btn btn-primary">申请组队</a>
                    <a href="#" class="btn btn-secondary">取消收藏</a>
                </div>
            </div>
        </div>

        <!-- 账号设置选项卡 -->
        <div class="tab-content" id="settings">
            <div class="user-settings">
                <div class="settings-group">
                    <h3 class="settings-title">基本信息</h3>
                    <div class="form-group">
                        <label for="username" class="form-label">用户名</label>
                        <input type="text" id="username" class="form-control" value="张三">
                    </div>
                    <div class="form-group">
                        <label for="email" class="form-label">邮箱</label>
                        <input type="email" id="email" class="form-control" value="zhangsan@example.com">
                    </div>
                    <div class="form-group">
                        <label for="phone" class="form-label">手机号</label>
                        <input type="tel" id="phone" class="form-control" value="13800138000">
                    </div>
                </div>

                <div class="settings-group">
                    <h3 class="settings-title">个人资料</h3>
                    <div class="form-group">
                        <label for="location" class="form-label">所在地</label>
                        <input type="text" id="location" class="form-control" value="北京市">
                    </div>
                    <div class="form-group">
                        <label for="bio" class="form-label">个人简介</label>
                        <textarea id="bio" class="form-control" rows="4">大学生志愿者，热爱支教，希望为山区教育贡献自己的力量。</textarea>
                    </div>
                </div>

                <div class="settings-group">
                    <h3 class="settings-title">修改密码</h3>
                    <div class="form-group">
                        <label for="current-password" class="form-label">当前密码</label>
                        <input type="password" id="current-password" class="form-control">
                    </div>
                    <div class="form-group">
                        <label for="new-password" class="form-label">新密码</label>
                        <input type="password" id="new-password" class="form-control">
                    </div>
                    <div class="form-group">
                        <label for="confirm-password" class="form-label">确认新密码</label>
                        <input type="password" id="confirm-password" class="form-control">
                    </div>
                </div>

                <div class="settings-actions">
                    <button class="btn btn-secondary">取消</button>
                    <button class="btn btn-primary">保存修改</button>
                </div>
            </div>
        </div>
    </div>

    <!-- 页脚 -->
    <footer class="footer">
        <div class="container">
            <div class="footer-content">
                <div class="footer-logo">
                    <img src="../static/avatar1.png" alt="朋知云学">
                    <p>朋知云学 - 让支教更简单</p>
                </div>
                <div class="footer-links">
                    <div class="link-group">
                        <h4>关于我们</h4>
                        <ul>
                            <li><a href="about.html">平台介绍</a></li>
                            <li><a href="rules.html">用户守则</a></li>
                            <li><a href="contact.html">联系我们</a></li>
                        </ul>
                    </div>
                    <div class="link-group">
                        <h4>帮助中心</h4>
                        <ul>
                            <li><a href="tutorial.html">使用教程</a></li>
                            <li><a href="faq.html">常见问题</a></li>
                            <li><a href="feedback.html">意见反馈</a></li>
                        </ul>
                    </div>
                    <div class="link-group">
                        <h4>法律信息</h4>
                        <ul>
                            <li><a href="agreement.html">用户协议</a></li>
                            <li><a href="privacy.html">隐私政策</a></li>
                        </ul>
                    </div>
                </div>
            </div>
            <div class="footer-bottom">
                <p>&copy; 2023 朋知云学. 保留所有权利.</p>
            </div>
        </div>
    </footer>

    <script src="js/main.js"></script>
    <script>
        // 选项卡切换功能
        document.addEventListener('DOMContentLoaded', function() {
            const tabItems = document.querySelectorAll('.tab-item');
            const tabContents = document.querySelectorAll('.tab-content');
            
            tabItems.forEach(item => {
                item.addEventListener('click', function() {
                    // 移除所有选项卡的active类
                    tabItems.forEach(tab => tab.classList.remove('active'));
                    // 为当前点击的选项卡添加active类
                    this.classList.add('active');
                    
                    // 获取当前选项卡对应的内容ID
                    const tabId = this.getAttribute('data-tab');
                    
                    // 隐藏所有内容
                    tabContents.forEach(content => content.classList.remove('active'));
                    // 显示当前选项卡对应的内容
                    document.getElementById(tabId).classList.add('active');
                });
            });
        });
    </script>
</body>
</html>